package io.plus.common.protocol;

import io.plus.common.packet.metadata.Command;
import io.plus.engine.pulse.AsynchronousSocketChannelContext;

/**
 * 转换不同协议消息包;
 */
public interface IPacketConverter {
    /**
     * 转化请求包
     */
    Packet converteRequestPacket(AsynchronousSocketChannelContext asynchronousSocketChannelContext, Command command, byte[] body);

    /**
     * 转化响应包
     */
    Packet converteResponsepPacket(AsynchronousSocketChannelContext asynchronousSocketChannelContext, Command command, byte[] body);
}
